home *** CD-ROM | disk | FTP | other *** search
- /*
- Library for ftpd clients.(libftp)
- Copyright by Oleg Orel
- All rights reserved.
-
- This library is desined for free, non-commercial software creation.
- It is changeable and can be improved. The author would greatly appreciate
- any advises, new components and patches of the existing programs.
- Commercial usage is also possible with participation of it's author.
-
-
-
- */
-
- #include "FtpLibrary.h"
-
- main(int a,char **b)
- {
- FILE *out,*in;
- String localfile;
- int c;
-
-
- if ( a != 2 )
- {
- fprintf(stderr,
- "Usage: %s node/user/pass:input-file\n",
- b[0]);
- exit(1);
- }
- if ((in=FtpFullOpen(b[1],"r"))==NULL)
- perror(b[1]),exit(1);
- sscanf(b[1],"%*[^:]:%s",localfile);
- if ((out=fopen(localfile,"w"))==NULL)
- perror(b[2]),exit(1);
-
- while((c=getc(in))!=EOF)
- putc(c,out);
- FtpFullClose(in);
- fclose(out);
- }
-